3.6 \(\int \frac{\sin (x)}{a+a \sin (x)} \, dx\)

Optimal. Leaf size=17 \[ \frac{x}{a}+\frac{\cos (x)}{a \sin (x)+a} \]

[Out]

x/a + Cos[x]/(a + a*Sin[x])

________________________________________________________________________________________

Rubi [A]  time = 0.0285508, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {2735, 2648} \[ \frac{x}{a}+\frac{\cos (x)}{a \sin (x)+a} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]/(a + a*Sin[x]),x]

[Out]

x/a + Cos[x]/(a + a*Sin[x])

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin{align*} \int \frac{\sin (x)}{a+a \sin (x)} \, dx &=\frac{x}{a}-\int \frac{1}{a+a \sin (x)} \, dx\\ &=\frac{x}{a}+\frac{\cos (x)}{a+a \sin (x)}\\ \end{align*}

Mathematica [B]  time = 0.0366239, size = 42, normalized size = 2.47 \[ \frac{\left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right ) \left ((x-2) \sin \left (\frac{x}{2}\right )+x \cos \left (\frac{x}{2}\right )\right )}{a (\sin (x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]/(a + a*Sin[x]),x]

[Out]

((Cos[x/2] + Sin[x/2])*(x*Cos[x/2] + (-2 + x)*Sin[x/2]))/(a*(1 + Sin[x]))

________________________________________________________________________________________

Maple [A]  time = 0.022, size = 25, normalized size = 1.5 \begin{align*} 2\,{\frac{\arctan \left ( \tan \left ( x/2 \right ) \right ) }{a}}+2\,{\frac{1}{a \left ( \tan \left ( x/2 \right ) +1 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a+a*sin(x)),x)

[Out]

2/a*arctan(tan(1/2*x))+2/a/(tan(1/2*x)+1)

________________________________________________________________________________________

Maxima [A]  time = 2.36792, size = 43, normalized size = 2.53 \begin{align*} \frac{2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} + \frac{2}{a + \frac{a \sin \left (x\right )}{\cos \left (x\right ) + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x, algorithm="maxima")

[Out]

2*arctan(sin(x)/(cos(x) + 1))/a + 2/(a + a*sin(x)/(cos(x) + 1))

________________________________________________________________________________________

Fricas [A]  time = 1.57898, size = 93, normalized size = 5.47 \begin{align*} \frac{{\left (x + 1\right )} \cos \left (x\right ) +{\left (x - 1\right )} \sin \left (x\right ) + x + 1}{a \cos \left (x\right ) + a \sin \left (x\right ) + a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x, algorithm="fricas")

[Out]

((x + 1)*cos(x) + (x - 1)*sin(x) + x + 1)/(a*cos(x) + a*sin(x) + a)

________________________________________________________________________________________

Sympy [B]  time = 0.631777, size = 39, normalized size = 2.29 \begin{align*} \frac{x \tan{\left (\frac{x}{2} \right )}}{a \tan{\left (\frac{x}{2} \right )} + a} + \frac{x}{a \tan{\left (\frac{x}{2} \right )} + a} - \frac{2 \tan{\left (\frac{x}{2} \right )}}{a \tan{\left (\frac{x}{2} \right )} + a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x)

[Out]

x*tan(x/2)/(a*tan(x/2) + a) + x/(a*tan(x/2) + a) - 2*tan(x/2)/(a*tan(x/2) + a)

________________________________________________________________________________________

Giac [A]  time = 2.36122, size = 26, normalized size = 1.53 \begin{align*} \frac{x}{a} + \frac{2}{a{\left (\tan \left (\frac{1}{2} \, x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+a*sin(x)),x, algorithm="giac")

[Out]

x/a + 2/(a*(tan(1/2*x) + 1))